Servo motor drive circuit and 3d printing apparatus

ABSTRACT

The present application provides a servo motor drive circuit and a 3D printing apparatus, a motion controller is configured to send a drive enable signal to the timer; a pulse period providing unit is configured to send a pulse period value to the timer and the first comparing unit at beginning of each pulse period; the timer is configured to perform initialization in response to the received pulse period value during enabling of the drive enable signal, perform cyclic timing by taking the pulse period value as a timing period, and send a timing duration to the first comparing unit; and the first comparing unit is configured to acquire current level information that satisfies a preset duty ratio according to the preset duty ratio, the pulse period value, and the timing duration, and send a drive signal to a servo motor according to the current level information.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of International ApplicationNo. PCT/CN2020/083150, filed on Apr. 3, 2020, which claims priority toChinese Patent Application No. 201910412904.8, filed with the ChinaNational Intellectual Property Administration on May 17, 2019 andentitled “SERVO MOTOR DRIVE CIRCUIT AND 3D PRINTING APPARATUS”. Thedisclosures of the aforementioned applications are hereby incorporatedby reference in their entireties.

TECHNICAL FIELD

The present application relates to the technical field of drive control,and in particular, to a servo motor drive circuit and a 3D printingapparatus.

BACKGROUND

An existing 3D printer generally includes a carriage and a supportplatform, and a printing head is mounted on the carriage. Usually, thecarriage is driven by a servo motor to maintain a uniform motion in aprinting area, and perform an accelerated motion or a decelerated motionin a non-printing area. For example, before printing a target object,the carriage needs to perform an accelerated motion until a moving speedof the carriage reaches a set speed value in the printing area; andafter completing a current printing area of the target object, thecarriage needs to perform a decelerated motion until the speed is 0; andthen, an accelerated motion is performed to print a next area.Therefore, it is necessary to accurately control an acceleratedrotation, a uniform rotation and a decelerated rotation of the servomotor according to motion requirements.

In the prior art, the rotation of the servo motor is controlled bysoftware of a single-chip microcomputer or a computer, and then thecarriage is driven to alternatively perform the accelerated motion, theuniform motion and the decelerated motion.

However, intervention of interruption is required in an accelerationphase or a deceleration phase for the single-chip microcomputer or thecomputer to change frequency of an output drive signal, thereby causinga problem of discontinuity in the accelerated motion and the deceleratedmotion of a moving part.

SUMMARY

Embodiments of the present application provide a servo motor drivecircuit and a 3D printing apparatus, which change frequency of an outputdrive signal autonomously, and improve stability of a duty ratio of adrive signal, thereby improving continuity of an accelerated motion anda decelerated motion of a moving part in the 3D printing apparatus.

According to a first aspect of the embodiments of the presentapplication, a servo motor drive circuit is provided, which includes: amotion controller, a timer, a first comparing unit and a pulse periodproviding unit;

the motion controller is connected to the timer, and is configured tosend a drive enable signal to the timer;

the pulse period providing unit is connected to the timer and the firstcomparing unit, and is configured to send a pulse period value to thetimer and the first comparing unit at beginning of each pulse period;

the timer is connected to the first comparing unit, and is configured toperform initialization in response to the received pulse period value inan enabling duration of the drive enable signal, perform cyclic timingby taking the pulse period value as a timing period, and send a timingduration to the first comparing unit; and

the first comparing unit is configured to acquire current levelinformation that satisfies a preset duty ratio according to the presetduty ratio, the pulse period value, and the timing duration, and send adrive signal of a high level or a low level to a servo motor accordingto the current level information.

Optionally, the pulse period providing unit includes: a latch, a latchtriggering unit and a period control unit;

the period control unit is connected to the latch, and is configured toreceive a pulse period update signal, and send a pulse period value of anext pulse period to the latch in response to the pulse period updatesignal;

the latch triggering unit is connected to the motion controller and thelatch, and is configured to receive a signal indicating end of a currentpulse period, or receive a latch signal from the motion controller, andsend a latch control signal to the latch at the beginning of each pulseperiod in response to the signal indicating the end of the current pulseperiod or the latch signal;

the latch is configured to receive the pulse period value from theperiod control unit in response to the latch control signal, and sendthe pulse period value received from the period control unit to thetimer and the first comparing unit; and the motion controller is furtherconfigured to send the latch signal to the latch triggering unit when afirst pulse period starts.

Optionally, the drive signal in each pulse period is a first levelsignal and a second level signal in sequence;

the servo motor drive circuit further includes: a first detecting unit;and

the first detecting unit is connected to the latch triggering unit andthe first comparing unit, and is configured to send the signalindicating the end of the current pulse period to the latch triggeringunit when a change from the second level signal to the first levelsignal is detected in the drive signal.

Optionally, the servo motor drive circuit further includes: a secondcomparing unit; and

the second comparing unit is connected to the latch triggering unit andthe timer, and is configured to acquire the timing duration from thetimer, and send the signal indicating the end of the current pulseperiod to the latch triggering unit when the timing duration is equal tothe pulse period value.

Optionally, the drive signal in each pulse period includes a first levelsignal and a second level signal in sequence;

the servo motor drive circuit further includes: a second detecting unit;and

the second detecting unit is connected to the period control unit andthe first comparing unit, and is configured to send the pulse periodupdate signal to the period control unit when a change from the firstlevel signal to the second level signal is detected in the drive signal.

Optionally, the servo motor drive circuit further includes: a thirdcomparing unit; and

the third comparing unit is connected to the period control unit and thetimer, and is configured to acquire the timing duration from the timer,and send the pulse period update signal to the period control unit whenthe timing duration is equal to a preset timing threshold, where thepreset timing threshold is greater than 0 and less than the pulse periodvalue.

Optionally, the drive signal in each pulse period includes a pulse validlevel signal and a pulse invalid level signal in sequence; and

the first comparing unit is configured to: determine a pulse validduration according to a preset duty ratio and the pulse period value,where the pulse valid duration is a product of the preset duty ratio andthe pulse period value; send the pulse valid level signal to the servomotor when the timing duration is less than or equal to the pulse validduration; and send the pulse invalid level signal to the servo motorwhen the timing duration is greater than the pulse valid duration.

Optionally, the drive signal in each pulse period includes a pulseinvalid level signal and a pulse valid level signal in sequence; and

the first comparing unit is configured to: determine a pulse invalidduration according to a preset duty ratio and the pulse period value,where the pulse invalid duration is a product of the pulse period valueand a difference between 1 and the preset duty ratio; send the pulseinvalid level signal to the servo motor when the timing duration is lessthan the pulse invalid duration, and send the pulse valid level signalto the servo motor when the timing duration is greater than or equal tothe pulse invalid duration.

Optionally, the drive signal in each pulse period includes a pulseinvalid level signal, a pulse valid level signal, and a pulse invalidlevel signal in sequence; and

the first comparing unit is configured to: determine a lower limitmoment of a pulse valid duration and an upper limit moment of the pulsevalid duration according to a preset duty ratio and the pulse periodvalue, where the lower limit moment of the pulse valid duration is 1/2of a product of the pulse period value and a difference between 1 andthe preset duty ratio, and the upper limit moment of the pulse validduration is 1/2 of a product of the pulse period value and a sum of 1and the preset duty ratio; send the pulse invalid level signal to theservo motor when the timing duration is less than the lower limit momentof the pulse valid duration; send the pulse valid level signal to theservo motor when the timing duration is less than or equal to the upperlimit moment of the pulse valid duration and greater than or equal tothe lower limit moment of the pulse valid duration; and send the pulseinvalid level signal to the servo motor when the timing duration isgreater than the upper limit moment of the pulse valid duration.

Optionally, the motion controller is further connected to the periodcontrol unit, and is configured to send an acceleration enable signal ora deceleration enable signal to the period control unit; and

the period control unit is further configured to: in response to theacceleration enable signal, send the pulse period value to the latchaccording to a periodic sequence corresponding to a preset accelerationcurve, and feed back a completion state signal of the presetacceleration curve to the motion controller; or, in response to thedeceleration enable signal, send the pulse period value to the latchaccording to a periodic sequence corresponding to a preset decelerationcurve, and feed back a completion state signal of the presetdeceleration curve to the motion controller.

Optionally, the motion controller is further configured to send a motiondirection signal to the servo motor.

Optionally, the motion controller is further configured to: performinitialization on the period control unit before sending theacceleration enable signal or the deceleration enable signal to theperiod control unit; send the latch signal to the latch triggering unitafter the initialization is completed and before the acceleration enablesignal or the deceleration enable signal is sent to the period controlunit; and send the drive enable signal to the timer after sending thelatch signal to enable the timer to count.

Optionally, the latch triggering unit includes an OR operation circuit.

According to a second aspect of the embodiments of the presentapplication, a 3D printing apparatus is provided, which includes: theservo motor drive circuit according to the first aspect and variouspossible designs of the first aspect of the present application.

In the servo motor drive circuit and the 3D printing apparatus providedin the present application, the servo motor drive circuit includes: amotion controller, a timer, a first comparing unit and a pulse periodproviding unit. The motion controller is connected to the timer, and isconfigured to send a drive enable signal to the timer; the pulse periodproviding unit is connected to the timer and the first comparing unit,and is configured to send a pulse period value to the timer and thefirst comparing unit at the beginning of each pulse period; the timer isconnected to the first comparing unit, and is configured to performinitialization in response to the received pulse period value in anenabling duration of the drive enable signal, perform cyclic timing bytaking the pulse period value as a timing period, and send a timingduration to the first comparing unit; and the first comparing unit isconfigured to acquire current level information that satisfies a presetduty ratio according to the preset duty ratio, the pulse period value,and the timing duration, and send a drive signal of a high level or alow level to a servo motor according to the current level information.Thus, autonomous changing of frequency of the output drive signal andprecise control of the duty ratio of the drive signal in each pulseperiod are realized, operational continuity and stability of the servomotor in an acceleration or deceleration phase are improved,intervention of software interruption is also reduced, and stability ofan overall system is improved.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic structural diagram of a servo motor drive circuitprovided by an embodiment of the present application;

FIG. 2 is a schematic diagram of a waveform of a drive signal in asingle pulse period provided by an embodiment of the presentapplication;

FIG. 3 is a schematic diagram of another waveform of a drive signal in asingle pulse period provided by an embodiment of the presentapplication;

FIG. 4 is a schematic diagram of another waveform of a drive signal in asingle pulse period provided by an embodiment of the presentapplication;

FIG. 5 is a schematic structural diagram of another servo motor drivecircuit provided by an embodiment of the present application;

FIG. 6 is a schematic structural diagram of still another servo motordrive circuit provided by an embodiment of the present application;

FIG. 7 is a schematic diagram of control logic provided by an embodimentof the present application;

FIG. 8 is a schematic diagram of another control logic provided by anembodiment of the present application;

FIG. 9 is a schematic structural diagram of yet another servo motordrive circuit provided by an embodiment of the present application;

FIG. 10 is a schematic structural diagram of yet another servo motordrive circuit provided by an embodiment of the present application; and

FIG. 11 is a schematic structural diagram of yet another servo motordrive circuit provided by an embodiment of the present application.

DESCRIPTION OF EMBODIMENTS

To describe the purpose, technical solutions and advantages ofembodiments of the present application more clearly, the followingclearly and completely describes the technical solutions in theembodiments of the present application in conjunction with accompanyingdrawings in the embodiments of the present application. Apparently, thedescribed embodiments are a part of the embodiments of the presentapplication, rather than all of the embodiments. Based on theembodiments of the present application, all other embodiments obtainedby persons of ordinary skill in the art without creative efforts belongto the protection scope of the present application.

The terms “first”, “second”, “third”, etc. in the description, claimsand the above-mentioned drawings of the present application are used todistinguish similar objects, and need not be used to describe aparticular order or sequence. It should be understood that data used inthis way may be interchanged, where appropriate, such that theembodiments of the present application described herein may beimplemented in an order other than those illustrated or describedherein.

It should be understood that, in various embodiments of the presentapplication, the size of a sequence number of each process does not meanan execution order, and the execution order of each process should bedetermined by its function and internal logic, and should not be limitedto an implementation process of the embodiments of the presentapplication.

It should be understood that in the present application, “including”,“having” and any variation thereof, are intended to cover non-exclusiveinclusion, e.g., a process, method, system, product or device includinga series of steps or units is not necessarily limited to those steps orunits set forth clearly, but may include other steps or units not setforth clearly or inherent to these processes, methods, products ordevices.

It should be understood that in the present application, “a pluralityof” refers to two or more. “And/or” is merely an associationrelationship describing associated objects, which represents that theremay be three kinds of relationships, for example, A and/or B, mayrepresent that there are three cases: A alone, A and B, and B alone. Thecharacter “I” generally indicates that the front and back associatedobjects are of an “or” relationship. “Including A, B and C” and“including A, B, C” refer to that three of A, B, and C are all included,“including A, B or C” refers to that one of A, B, and C is included, and“including A, B and/or C” refers to that any one or two or three of A,B, and C are included.

It should be understood that in the present application, “Bcorresponding to A”, “B which corresponds to A”, “A corresponds to B”,or “B corresponds to A”, represents that B is associated with A, and Bcan be determined according to A. Determining B according to A does notmean that B is determined only according to A, and B may also bedetermined according to A and/or other information. The matching betweenA and B is that similarity between A and B is greater than or equal to apreset threshold.

In the present application, depending on the context, the terms “if” and“in response to” may be interpreted as “in a case where”, or “when”, or“in response to determining”, or “in response to detecting”. Moreover,the term “connecting” herein includes any direct and indirect electricalconnecting means, therefore, if a first element is described herein asbeing connected to a second element, it means that the first element canbe directly electrically connected to the second element, or indirectlyelectrically connected to the second element by other elements orconnecting means.

The technical solutions of the present application will be described indetail below with reference to specific embodiments. The followingspecific embodiments may be combined with each other, and the same orsimilar concepts or processes may not be repeated in some embodiments.

In an application scenario such as a 3D printer, a servo motor drivecircuit in an embodiment of the present application sends a drive signalto a servo motor, and the servo motor operates in a specified directionand rotation speed according to a pulse of the drive signal, and drivesa moving part of a carriage of the 3D printer to perform an accelerated,uniform or decelerated motion on a support platform, so as to realize 3Dprinting. Through the servo motor drive circuit provided by theembodiment of the present application, autonomous changing of frequencyof the output drive signal can be realized, a duty ratio in a pulseperiod can be accurately controlled, operational continuity andstability of the servo motor during an acceleration or decelerationphase are improved, intervention of software interruption is reduced,and stability of an overall system is improved.

Referring to FIG. 1, which is a schematic structural diagram of a servomotor drive circuit provided by an embodiment of the presentapplication, the servo motor drive circuit shown in FIG. 1 mainlyincludes a motion controller, a timer, a first comparing unit and apulse period providing unit.

As shown in FIG. 1, the motion controller is connected to the timer, andis configured to send a drive enable signal to the timer. It can beunderstood that an output end of the drive enable signal of the motioncontroller is connected to an enable end of the timer, and the motioncontroller keeps transmitting the enable signal to the timer during amotion of the moving part or during an implementation of the 3Dprinting, which enables the timer to keep a power-on working state in anenabling duration of the drive enable signal.

As shown in FIG. 1, the pulse period providing unit is connected to thetimer and the first comparing unit, and is configured to send a pulseperiod value to the timer and the first comparing unit at beginning ofeach pulse period. It can be understood that the pulse period providingunit stores a pulse period sequence in advance, and simultaneously sendsthe pulse period value of each pulse period to the timer and the firstcomparing unit according to the pulse period sequence. In someembodiments, the pulse period providing unit may send the pulse periodvalue periodically, or may determine a moment to send the pulse periodvalue according to an output signal of the timer and/or an output signalof the first comparing unit.

As shown in FIG. 1, the timer is connected to the first comparing unit,and is configured to perform initialization in response to the receivedpulse period value in the enabling duration of the drive enable signal,perform cyclic timing by taking the pulse period value as a timingperiod, and send a timing duration to the first comparing unit. It canbe understood that, when receiving the pulse period value, the timerimmediately performs the initialization, and initializes a currenttiming duration to 0 and starts counting from 0 again. Performing cyclictiming by taking the pulse period value as the timing period, can beunderstood as, the cyclic timing is implemented by starting countingfrom 0 and starting counting from 0 again after the timing durationreaches the pulse period value. For example, the pulse period value is15, and the timer counts from 0 to 15, and then returns to 0 to countagain. In a process of cyclic timing, the timer sends the timingduration to the first comparing unit in real time, for example, countingto 11, and then sending 11 to the first comparing unit and continuing tocount to 12, and then sending 12 to the first comparing unit, therebyenabling the first comparing unit to obtain a current timing duration ofthe timer in real time.

In the embodiment shown in FIG. 1, the first comparing unit isconfigured to acquire current level information that satisfies a presetduty ratio according to the preset duty ratio, the pulse period value,and the timing duration, and send a drive signal of a high level or alow level to a servo motor according to the current level information.The first comparing unit may, for example, store the preset duty ratioin advance, and then perform a comparison with the timing durationaccording to the preset duty ratio and the pulse period value, so as todetermine whether to output the high level or the low level to the servomotor, which enables the drive signal to satisfy the preset duty ratio.

In the present embodiment, the preset duty ratio is a proportion ofoutput time of a valid level signal in one pulse period. The valid levelsignal may be understood as a signal component that enables the servomotor to rotate in response thereto. Outputting an output pulsecorresponding to the high level is taken as an example, the duty ratiorefers to a ratio of a duration of outputting the high level in acurrent pulse period to a current pulse period value, or a ratio of aduration occupied by a pulse in the current pulse period to the currentpulse period value. For example, the drive signal may take the highlevel as the valid level signal, and the duty ratio is a proportion ofoutput time of the high level in one pulse period. Or, the drive signalmay take the low level as the valid level signal, and the duty ratio isa proportion of output time of the low level in one pulse period. In thepresent embodiment, the duty ratio is the same in each pulse period.Optionally, the preset duty ratio 1/K is not close to 0 or not close to1, and K is a number greater than 1. For example, the preset duty ratio1/K may be 1/2. Thus, the possibility that an anti-interference filterthat may be introduced during signal transmission easily filters a highfrequency signal as an interference wave, resulting in the servo motorbeing unable to be driven, is reduced.

In the embodiment shown in FIG. 1, an implementation of the firstcomparing unit is determined according to a form of the drive signal ina single pulse period, and the drive signal in each pulse period mayhave a plurality of forms. A function of the first comparing unit willbe illustratively described below by taking the high level as a validlevel signal in combination with three optional drive signals shown inFIG. 2 to FIG. 4.

In some embodiments, reference is made to FIG. 2, which is a schematicdiagram of a waveform of a drive signal in a single pulse periodprovided by an embodiment of the present application. As shown in FIG.2, the drive signal in each pulse period includes a pulse valid levelsignal and a pulse invalid level signal in sequence. That is, the highlevel is output first, and then the low level is output.

In the embodiment shown in FIG. 2, the first comparing unit may beconfigured to: determine a pulse valid duration according to a presetduty ratio and the pulse period value, where the pulse valid duration isa product of the preset duty ratio and the pulse period value; send thepulse valid level signal to a servo motor when the timing duration isless than or equal to the valid duration; and send the pulse invalidlevel signal to the servo motor when the timing duration is greater thanthe valid duration. For example, the current pulse period is T0, thehigh level is the valid level signal, a pulse valid duration is T0/K, atime value recorded by the timer is t0, and the first comparing unitcompares t0 with T0/K: when t0≤T0/K, an output pulse corresponding tothe high level is output; and when t0>T0/K, the low level is output. Thefirst comparing unit outputs the high level or the low level in thesubsequent pulse periods T1, T2, . . . , in the same manner, therebyrealizing stable maintenance of the duty ratio at 1/K in each pulseperiod.

In some other embodiments, reference is made to FIG. 3, which is aschematic diagram of another waveform of a drive signal in a singlepulse period provided by an embodiment of the present application. Asshown in FIG. 3, the drive signal in each pulse period includes a pulseinvalid level signal and a pulse valid level signal in sequence. Thatis, the low level is output first and then the high level is output.

In the embodiment shown in FIG. 3, the first comparing unit may beconfigured to: determine a pulse invalid duration according to a presetduty ratio and the pulse period value, where the pulse invalid durationis a product of the pulse period value and a difference between 1 andthe preset duty ratio; and send the pulse invalid level signal to aservo motor when the timing duration is less than the invalid duration,and send the pulse valid level signal to the servo motor when the timingduration is greater than or equal to the invalid duration. For example,the current pulse period is T0, the high level is the valid levelsignal, the invalid duration of the pulse is T0(1−1/K), a time valuerecorded by the timer is t0, and the first comparing unit compares t0with T0(1−1/K): when t0<T0(1−1/K), the low level is output; and whent0≥T0(1−1/K), an output pulse corresponding to the high level is output.The first comparing unit outputs the high level or the low level in thesubsequent pulse periods T1, T2, . . . , in the same manner, therebyrealizing stable maintenance of the duty ratio at 1/K in each pulseperiod.

In some embodiments, reference is made to FIG. 4, which is a schematicdiagram of another waveform of a drive signal in a single pulse periodprovided by an embodiment of the present application. As shown in FIG.4, the drive signal in each pulse period includes a pulse invalid levelsignal, a pulse valid level signal, and a pulse invalid level signal insequence. That is, the low level is output first, the high level isoutput then, and the low level is output finally.

In the embodiment shown in FIG. 4, the first comparing unit may beconfigured to: determine a lower limit moment of a pulse valid durationand an upper limit moment of the pulse valid duration according to apreset duty ratio and the pulse period value, where the lower limitmoment of the pulse valid duration is 1/2 of a product of the pulseperiod value and a difference between 1 and the preset duty ratio, theupper limit moment of the pulse valid duration is 1/2 of a product ofthe pulse period value and a sum of 1 and the preset duty ratio; sendthe pulse invalid level signal to a servo motor when the timing durationis less than the lower limit moment of the pulse valid duration; sendthe pulse valid level signal to the servo motor when the timing durationis less than or equal to the upper limit moment of the pulse validduration and greater than or equal to the lower limit moment of thepulse valid duration; and send the pulse invalid level signal to theservo motor when the timing duration is greater than the upper limitmoment of the pulse valid duration. For example, the current pulseperiod is T0, the high level is the valid level signal, the firstcomparing unit compares time t0 recorded by the timer with T0(K−1)/2K,and compares time t0 recorded by the timer with T0(K+1)/2K: whent0<T0(K−1)/2K, the low level is output; when T0(K−1)/2K≤t0≤T0(K+1)/2K,an output pulse corresponding to the high level is output; and whent0>T0(K+1)/2K, the low level is output. The first comparing unit outputsthe high level or the low level in the subsequent pulse periods T1, T2,. . . , in the same manner, thereby realizing stable maintenance of theduty ratio at 1/K in each pulse period.

In the servo motor drive circuit provided in the present embodiment, themotion controller, the timer, the first comparing unit and the pulseperiod providing unit are included. The motion controller is connectedto the timer, and is configured to send the drive enable signal to thetimer; the pulse period providing unit is connected to the timer and thefirst comparing unit, and is configured to send the pulse period valueto the timer and the first comparing unit at the beginning of each pulseperiod; the timer is connected to the first comparing unit, and isconfigured to perform the initialization in response to the receivedpulse period value in the enabling duration of the drive enable signal,perform the cyclic timing by taking the pulse period value as the timingperiod, and send the timing duration to the first comparing unit; andthe first comparing unit is configured to acquire the current levelinformation that satisfies the preset duty ratio according to the presetduty ratio, the pulse period value, and the timing duration, and sendthe drive signal of the high level or the low level to the servo motoraccording to the current level information. Thus, precise control of theduty ratio of the drive signal in each pulse period is realized,operational continuity and stability of the servo motor in anacceleration or deceleration phase are improved, intervention ofsoftware interruption is also reduced, and stability of an overallsystem is improved.

Based on the foregoing embodiments, there may be a plurality ofimplementations of the pulse period providing unit, and a structure ofthe pulse period providing unit will be illustratively described belowin combination with the accompanying drawings and specific embodiments.

Referring to FIG. 5, which is a schematic structural diagram of anotherservo motor drive circuit provided by an embodiment of the presentapplication, in the structure shown in FIG. 5, the pulse periodproviding unit may include a latch, a latch triggering unit, and aperiod control unit.

As shown in FIG. 5, the period control unit is connected to the latch,and is configured to receive a pulse period update signal, and send apulse period value of a next pulse period to the latch in response tothe pulse period update signal. The period control unit may be a circuithaving a function of storage, and addition and subtraction logic, andwhen receiving the pulse period update signal, updates a current pulseperiod value to the pulse period value of the next pulse period by usingthe pulse period update signal as an enable signal, and sends the pulseperiod value of the next pulse period to the latch, thereby realizingupdating of the pulse period value. In some embodiments, the pulseperiod update signal received by the period control unit may bedetermined according to an output signal of the timer or an outputsignal of the first comparing unit, and reference may be made to thefollowing illustrated description for details.

As shown in FIG. 5, the latch triggering unit is connected to the motioncontroller and the latch, and is configured to receive a signalindicating end of a current pulse period, or receive a latch signal fromthe motion controller, and send a latch control signal to the latch atthe beginning of each pulse period in response to the signal indicatingthe end of the current pulse period or the latch signal. The motioncontroller shown in FIG. 5 is further configured to send the latchsignal to the latch triggering unit when a first pulse period starts.

For example, when the first pulse period starts, the motion controllersends the latch signal to the latch triggering unit, for example, a highlevel signal 1, and when receiving the latch signal of the high levelsignal 1, the latch triggering unit is enabled and sends a latch controlsignal to the latch. After the first pulse period, the latch triggeringunit sends the latch control signal to the latch when receiving thesignal indicating the end of the current pulse period. The latch signaland the signal indicating the end of the current pulse period may bothbe at the high level 1. After sending the latch signal, the motioncontroller may still be electrically connected to the latch triggeringunit, but the motion controller transmits a low level 0 to the latchtriggering unit, and the latch triggering unit is not enabled by the lowlevel 0.

In some embodiments, the latch triggering unit may include or consist ofan OR operation circuit. In the embodiment in which the latch triggeringunit is the OR operation circuit, if any input signal of the ORoperation circuit is 1, the OR operation circuit outputs a latch controlsignal 1 to the latch, and if all input signals of the OR operationcircuit are 0, the OR operation circuit outputs a non-latch controlsignal 0 to the latch. In the above embodiment, the signal indicatingthe end of the current pulse period and the latch control signal thatare input to the OR operation circuit may both be understood as 1. Forexample, the motion controller sends a latch signal 1 only once when thefirst pulse period starts, and the motion controller outputs 0 to thelatch triggering unit in remaining time. It can be seen that, in theremaining time, the latch triggering unit outputs the latch controlsignal 1 only in response to the signal indicating the end of thecurrent pulse period, and outputs 0 when the signal indicating the endof the current pulse period is not received.

As shown in FIG. 5, the latch is configured to receive the pulse periodvalue from the period control unit in response to the latch controlsignal, and send the pulse period value received from the period controlunit to the timer and the first comparing unit.

For example, when the first pulse period starts, the period control unitreceives the pulse period update signal, and sends a pulse period valueT0 of the first pulse period to the latch in response to the pulseperiod update signal, and the motion controller sends the latch signal 1to the latch triggering unit, and sends a drive enable signal 1 to thetimer. The latch triggering unit sends the latch control signal 1 to thelatch in response to the latch signal. The latch receives and latches T0sent by the period control unit in response to the latch control signal1, and sends T0 to the timer and the first comparing unit. The timerperforms the initialization when T0 is received and cyclically countswith the T0 as a period, and sends the timing duration to the firstcomparing unit at the same time. The first comparing unit determineswhether to output the high level or the low level to the servo motoraccording to the input T0, the timing duration and the preset dutyratio. Before T0 arrives, the latch keeps latching T0, but does not senda new pulse period value to the timer and the first comparing unit untilthe current pulse period ends, and the latch triggering unit receivesthe signal indicating the end of the current pulse period. The latchtriggering unit sends the latch control signal 1 to the latch inresponse to a signal 1 that the current pulse period ends. Whenreceiving the latch control signal 1, the latch receives and latches T1sent by the period control unit, sends T1 to the timer and the firstcomparing unit, to start cyclic timing and outputting of the drivesignal, of a new pulse period. The period control unit may generate andsend T1 to the latch before T0 arrives.

In the present embodiment, through the above-mentioned latch, the latchtriggering unit and the period control unit, automatic and accuratecontrol of the pulse period of the drive signal is realized, theintervention of the motion controller is reduced, and stability of theduty ratio of the drive signal is further improved.

In the above embodiments, the signal indicating the end of the currentpulse period and the pulse period update signal may be obtainedaccording to an output of the timer and/or the first comparing unit.Hereinafter, the structure of acquiring the signal indicating the end ofthe current pulse period and the structure of acquiring the pulse periodupdate signal will be illustratively described in combination with theaccompanying drawings and specific embodiments, but the presentapplication is not limited thereto.

Referring to FIG. 6, which is a schematic structural diagram of stillanother servo motor drive circuit provided by an embodiment of thepresent application, in the embodiment of the servo motor drive circuitshown in FIG. 6, the signal indicating the end of the current pulseperiod may be acquired by a first detecting unit. The drive signal ineach pulse period is a first level signal and a second level signal insequence.

The servo motor drive circuit further includes: a first detecting unit.The first detecting unit is connected to the latch triggering unit andthe first comparing unit, and is configured to send the signalindicating the end of the current pulse period to the latch triggeringunit when a change from the second level signal to the first levelsignal is detected in the drive signal.

In some embodiments, referring to FIG. 7, which is a schematic diagramof control logic provided by an embodiment of the present application,as shown in FIG. 7, the first level signal is a low level signal, andthe second level signal is a high level signal, and the first detectingunit may be understood as a falling edge extracting circuit. The firstcomparing unit outputs a low level and then outputs a high level in onepulse period, and when the first detecting unit extracts a falling edgesignal of the drive signal, it is indicated that the timing of the timerreaches the pulse period value and starts to retiming from 0, andtherefore the first detecting unit generates the signal indicating theend of the current pulse period, and enables the latch to send the pulseperiod value of the next pulse period.

In some embodiments, referring to FIG. 8, which is a schematic diagramof another control logic provided by an embodiment of the presentapplication, as shown in FIG. 8, the first level signal is a high levelsignal and the second level signal is a low level signal, then the firstdetecting unit may be understood as a rising edge extracting circuit.The first comparing unit outputs a high level and then outputs a lowlevel in one pulse period, and when the first detecting unit extracts arising edge signal of the drive signal, it is indicated that the timingof the timer reaches the pulse period value and starts to retiming from0, and therefore the first detecting unit generates the signalindicating the end of the current pulse period, and enables the latch tosend the pulse period value of the next pulse period.

In the present embodiment, control accuracy of the pulse period isimproved through the first detecting unit.

Referring to FIG. 9, which is a schematic structural diagram of yetanother servo motor drive circuit provided by an embodiment of thepresent application, the signal indicating the end of the current pulseperiod in the embodiment of the servo motor drive circuit shown in FIG.9 may be acquired by a second comparing unit. For example, the servomotor drive circuit further includes: a second comparing unit. Thesecond comparing unit is connected to the latch triggering unit and thetimer, and is configured to acquire the timing duration from the timer,and send the signal indicating the end of the current pulse period tothe latch triggering unit when the timing duration is equal to the pulseperiod value. It can be understood that the second comparing unitcompares the timing duration with the pulse period value, and when thetiming duration is equal to the pulse period value, it is indicated thatthe current period ends, and the latch needs to provide the pulse periodvalue of the next pulse period, then the second comparing unit sends thesignal indicating the end of the current pulse period to the latchtriggering unit. In the present embodiment, the control accuracy of thepulse period is improved through the second comparing unit.

With continued reference to FIG. 6 and FIG. 9, the pulse period updatesignal may be acquired by a second detecting unit. In the embodimentsshown in FIG. 6 and FIG. 9, the drive signal in each of pulse periodsmay include a first level signal and a second level signal in sequence.The servo motor drive circuit can further include a second detectingunit. The second detecting unit is connected to the period control unitand the first comparing unit, and is configured to send the pulse periodupdate signal to the period control unit when a change from the firstlevel signal to the second level signal is detected in the drive signal.

In some embodiments, as shown in FIG. 7, the first level signal is a lowlevel signal, and the second level signal is a high level signal, thenthe second detecting unit may be understood as a rising edge extractingcircuit. The first comparing unit outputs a low level and then outputs ahigh level in one pulse period, and when the second detecting unitextracts a rising edge signal of the drive signal, it is indicated thatthe timer starts timing after the initialization but does not reach thepulse period value; and therefore, the second detecting unit generatesthe pulse period update signal, to enable the period control unit togenerate and transmit the pulse period value of the next pulse period.At this time, the latch also latches the current pulse period value, anddoes not receive the pulse period value transmitted by the periodcontrol unit until the current pulse period ends, and through the signalindicating the end of the current pulse period output by the firstdetecting unit in FIG. 6 or the second comparing unit in FIG. 9, thelatch immediately receives the pulse period value transmitted by theperiod control unit for latching and sending. It can be seen that, thepulse period value of the next pulse period can be generated in advancethrough the second detecting unit before the current pulse period ends,thereby improving the reliability and update speed of the pulse periodvalue.

In some other embodiments, as shown in FIG. 8, the first level signal isa high level signal and the second level signal is a low level signal,then the second detecting unit may be understood as a falling edgeextracting circuit. The first comparing unit outputs a high level andthen outputs a low level in one pulse period; when the second detectingunit extracts a falling edge signal of the drive signal, it is indicatedthat the timer starts timing after initialization but does not reach thepulse period value; and therefore, the second detecting unit generatesthe pulse period update signal to enable the period control unit togenerate and transmit the pulse period value of the next pulse period.At this time, the latch still latches the current pulse period value,and does not receive the pulse period value transmitted by the periodcontrol unit until the current pulse period ends, and through the signalindicating the end of the current pulse period output by the firstdetecting unit in FIG. 6 or the second comparing unit in FIG. 9, thelatch immediately receives the pulse period value transmitted by theperiod control unit for latching and sending. It can be seen that, thepulse period value of the next pulse period can be generated in advancethrough the second detecting unit before the current pulse period ends,thereby improving the reliability and update speed of the pulse periodvalue.

In still some other embodiments, the drive signal may include a firstlevel signal, a second level signal and a first level signal insequence. For example, the first comparing unit outputs a low levelfirst and then outputs a high level and then outputs a low level in onepulse period. Compared with the foregoing embodiments, in the presentembodiment, it is only possible to output the signal indicating the endof the current pulse period through the second comparing unit in FIG. 9,that is, the structure shown in FIG. 6 cannot be applied in the presentembodiment. In the present embodiment, referring to FIG. 9, the seconddetecting unit may be construed as the above-mentioned rising edgeextracting circuit or falling edge extracting circuit, so as to send thepulse period update signal to the period control unit when the risingedge or the falling edge is acquired.

In the present embodiment, through the second detecting unit, the pulseperiod update signal may be sent to the period control unit before thecurrent pulse period ends, which enables the period control unit togenerate the pulse period value of the next pulse period in advance,thereby improving the reliability and update speed of the pulse periodvalue.

Reference is made to FIG. 10, which is a schematic structural diagram ofyet another servo motor drive circuit provided by an embodiment of thepresent application. Reference is made to FIG. 11, which is a schematicstructural diagram of yet another servo motor drive circuit provided byan embodiment of the present application. Referring to FIG. 10 and FIG.11, the servo motor drive circuit can further include a third comparingunit. The third comparing unit is connected to the period control unitand the timer, and is configured to acquire the timing duration from thetimer, and send the pulse period update signal to the period controlunit when the timing duration is equal to a preset timing threshold,where the timing threshold is greater than 0 and less than the pulseperiod value. In the embodiment in which the pulse period update signalis sent by the third comparing unit, the signal indicating the end ofthe current pulse period may be sent by the first detecting unit or thesecond comparing unit, see FIG. 10 and FIG. 11. It can be understoodthat the third comparing unit compares the timing duration with thetiming threshold, the timing threshold is a non-zero value smaller thanthe pulse period value, and when the timing duration is equal to thetiming threshold, it is indicated that the current pulse period has beenstarted, but the current pulse period has not been ended (the timingthreshold is smaller than the pulse period value), and the periodcontrol unit is required to provide the pulse period value of the nextpulse period. In the present embodiment, the control accuracy of thepulse period is improved through the third comparing unit.

In each of the above embodiments, the pulse period providing unit may,for example, perform automatic initialization periodically and generatethe pulse period value according to pre-stored data, or may be connectedto the motion controller (see FIG. 10 and FIG. 11), and performinitialization according to the control of the motion controller andgenerate the pulse period value. A function of initializing the pulseperiod providing unit is to output a first pulse period T0 to start theservo motor drive circuit in the present application.

In each of the above embodiments, the motion controller may also controlthe pulse period value generated by the period control unit by sendingan acceleration enable signal or a deceleration enable signal to theperiod control unit. For example, referring to FIG. 10 and FIG. 11, themotion controller is further connected to the period control unit and isconfigured to send the acceleration enable signal or the decelerationenable signal to the period control unit.

In FIG. 10 and FIG. 11, the period control unit is further configuredto: when the acceleration enable signal is received, send the pulseperiod value to the latch according to a periodic sequence correspondingto a preset acceleration curve in response to the acceleration enablesignal, and feed back a completion state signal of the presetacceleration curve to the motion controller. Or, the period control unitis further configured to: when the deceleration enable signal isreceived, send the pulse period value to the latch according to aperiodic sequence corresponding to a preset deceleration curve inresponse to the deceleration enable signal, and feed back a completionstate signal of the preset deceleration curve to the motion controller.

With continued reference to FIG. 10 and FIG. 11, the motion controllermay be further configured to: send a motion direction signal to theservo motor. The servo motor determines the direction in which itrotates according to the motion direction signal.

Based on the foregoing embodiments, the motion controller is furtherconfigured to perform initialization on the period control unit beforesending the acceleration enable signal or the deceleration enable signalto the period control unit. The initialization of the period controlunit may be such that the period control unit generates the first pulseperiod value T0 and outputs the first pulse period value, for example.After the initialization is completed and before the acceleration enablesignal or the deceleration enable signal is sent to the period controlunit, the motion controller may further send a latch signal to the latchtriggering unit to enable the latch to receive T0 and send T0 to thetimer and the first comparing unit. After sending the latch signal, themotion controller sends the drive enable signal to the timer to enablethe timer to count.

On the basis of the above embodiments, an embodiment of the presentapplication provides a 3D printing apparatus, which may include theservo motor drive circuit described in any one of the above embodiments.For example, the 3D printing apparatus includes a servo motor drivecircuit that controls speed change of a servo motor in any of theabove-mentioned specific embodiments and various embodiments, a servomotor, and a moving part. The first comparing unit is electricallyconnected to the servo motor, and the motion controller is connected tothe servo motor drive circuit. The motion controller outputs a motiondirection signal to the servo motor, and the first comparing unit sendsa drive signal to the servo motor, to cause the servo motor to operatein a specified direction and rotation speed, and finally to drive themoving part to accelerate or decelerate.

Finally, it should be noted that each of the above embodiments is merelyused for describing technical solutions of the present application, andis not limited thereto. Although the present application is described indetail with reference to the foregoing embodiments, it should beunderstood by those skilled in the art that the technical solutionsdescribed in the foregoing embodiments can still be modified, orequivalent replacements can be made to some or all of the technicalfeatures. These amendments or replacements do not depart from the scopeof the technical solutions of the embodiments of the presentapplication.

What is claimed is:
 1. A servo motor drive circuit, comprising: a motioncontroller, a timer, a first comparing unit and a pulse period providingunit; the motion controller is connected to the timer, and is configuredto send a drive enable signal to the timer; the pulse period providingunit is connected to the timer and the first comparing unit, and isconfigured to send a pulse period value to the timer and the firstcomparing unit at beginning of each pulse period; the timer is connectedto the first comparing unit, and is configured to perform initializationin response to the received pulse period value in an enabling durationof the drive enable signal, perform cyclic timing by taking the pulseperiod value as a timing period, and send a timing duration to the firstcomparing unit; and the first comparing unit is configured to acquirecurrent level information that satisfies a preset duty ratio accordingto the preset duty ratio, the pulse period value, and the timingduration, and send a drive signal of a high level or a low level to aservo motor according to the current level information.
 2. The servomotor drive circuit according to claim 1, wherein the pulse periodproviding unit comprises: a latch, a latch triggering unit and a periodcontrol unit; the period control unit is connected to the latch, and isconfigured to receive a pulse period update signal, and send a pulseperiod value of a next pulse period to the latch in response to thepulse period update signal; the latch triggering unit is connected tothe motion controller and the latch, and is configured to receive asignal indicating end of a current pulse period, or receive a latchsignal from the motion controller, and send a latch control signal tothe latch at the beginning of each pulse period in response to thesignal indicating the end of the current pulse period or the latchsignal; the latch is configured to receive the pulse period value fromthe period control unit in response to the latch control signal, andsend the pulse period value received from the period control unit to thetimer and the first comparing unit; and the motion controller is furtherconfigured to send the latch signal to the latch triggering unit when afirst pulse period starts.
 3. The servo motor drive circuit according toclaim 2, wherein the drive signal in each pulse period is a first levelsignal and a second level signal in sequence; the servo motor drivecircuit further comprises: a first detecting unit; and the firstdetecting unit is connected to the latch triggering unit and the firstcomparing unit, and is configured to send the signal indicating the endof the current pulse period to the latch triggering unit when a changefrom the second level signal to the first level signal is detected inthe drive signal.
 4. The servo motor drive circuit according to claim 2,further comprising: a second comparing unit; and the second comparingunit is connected to the latch triggering unit and the timer, and isconfigured to acquire the timing duration from the timer, and send thesignal indicating the end of the current pulse period to the latchtriggering unit when the timing duration is equal to the pulse periodvalue.
 5. The servo motor drive circuit according to claim 2, whereinthe drive signal in each pulse period comprises a first level signal anda second level signal in sequence; the servo motor drive circuit furthercomprises: a second detecting unit; and the second detecting unit isconnected to the period control unit and the first comparing unit, andis configured to send the pulse period update signal to the periodcontrol unit when a change from the first level signal to the secondlevel signal is detected in the drive signal.
 6. The servo motor drivecircuit according to claim 2, further comprising: a third comparingunit; and the third comparing unit is connected to the period controlunit and the timer, and is configured to acquire the timing durationfrom the timer, and send the pulse period update signal to the periodcontrol unit when the timing duration is equal to a timing thresholdwhich is preset, wherein the timing threshold is greater than 0 and lessthan the pulse period value.
 7. The servo motor drive circuit accordingto claim 1, wherein the drive signal in each pulse period comprises apulse valid level signal and a pulse invalid level signal in sequence;and the first comparing unit is configured to: determine a pulse validduration according to a preset duty ratio and the pulse period value,wherein the pulse valid duration is a product of the preset duty ratioand the pulse period value; send the pulse valid level signal to theservo motor when the timing duration is less than or equal to the pulsevalid duration; and send the pulse invalid level signal to the servomotor when the timing duration is greater than the pulse valid duration.8. The servo motor drive circuit according to claim 1, wherein the drivesignal in each pulse period comprises a pulse invalid level signal and apulse valid level signal in sequence; and the first comparing unit isconfigured to: determine a pulse invalid duration according to a presetduty ratio and the pulse period value, wherein the pulse invalidduration is a product of the pulse period value and a difference between1 and the preset duty ratio; and send the pulse invalid level signal tothe servo motor when the timing duration is less than the pulse invalidduration, and send the pulse valid level signal to the servo motor whenthe timing duration is greater than or equal to the pulse invalidduration.
 9. The servo motor drive circuit according to claim 1, whereinthe drive signal in each pulse period comprises a pulse invalid levelsignal, a pulse valid level signal, and a pulse invalid level signal;and the first comparing unit is configured to: determine a lower limitmoment of a pulse valid duration and an upper limit moment of the pulsevalid duration according to a preset duty ratio and the pulse periodvalue, wherein the lower limit moment of the pulse valid duration is 1/2of a product of the pulse period value and a difference between 1 andthe preset duty ratio, and the upper limit moment of the pulse validduration is 1/2 of a product of the pulse period value and a sum of 1and the preset duty ratio; send the pulse invalid level signal to theservo motor when the timing duration is less than the lower limit momentof the pulse valid duration; send the pulse valid level signal to theservo motor when the timing duration is less than or equal to the upperlimit moment of the pulse valid duration and greater than or equal tothe lower limit moment of the pulse valid duration; and send the pulseinvalid level signal to the servo motor when the timing duration isgreater than the upper limit moment of the pulse valid duration.
 10. Theservo motor drive circuit according to claim 2, wherein the motioncontroller is further connected to the period control unit, and isconfigured to send an acceleration enable signal or a decelerationenable signal to the period control unit; and the period control unit isfurther configured to: in response to the acceleration enable signal,send the pulse period value to the latch according to a periodicsequence corresponding to a preset acceleration curve, and feed back acompletion state signal of the preset acceleration curve to the motioncontroller; or, in response to the deceleration enable signal, send thepulse period value to the latch according to a periodic sequencecorresponding to a preset deceleration curve, and feed back a completionstate signal of the preset deceleration curve to the motion controller.11. The servo motor drive circuit according to claim 10, wherein themotion controller is further configured to send a motion directionsignal to the servo motor.
 12. The servo motor drive circuit accordingto claim 10, wherein the motion controller is further configured to:perform initialization on the period control unit before sending theacceleration enable signal or the deceleration enable signal to theperiod control unit; send the latch signal to the latch triggering unitafter the initialization is completed and before the acceleration enablesignal or the deceleration enable signal is sent to the period controlunit; and send the drive enable signal to the timer after sending thelatch signal to enable the timer to count.
 13. The servo motor drivecircuit according to claim 2, wherein the latch triggering unitcomprises an OR operation circuit.
 14. A 3D printing apparatus,comprising the servo motor drive circuit according to claim 1.